import {createApp} from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Antd from 'ant-design-vue'
import 'ant-design-vue/es/style' // ✅ 正确导入方式
import axios from "axios";

axios.defaults.baseURL = process.env.VUE_APP_SERVER;

//拦截请求
axios.interceptors.request.use(config => {
    console.log('请求拦截', config);
    return config;
},error => {
    return Promise.reject(error);
})

//拦截返回
axios.interceptors.response.use(response => {
  console.log('响应拦截', response);
  return response;
},error => {
  return Promise.reject(error);
})

createApp(App).use(store).use(router).use(Antd).mount('#app')
console.log('环境', process.env.NODE_ENV);
console.log('服务端', process.env.VUE_APP_SERVER);
